﻿using RabbitMQ.Client;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Routing.Send
{
    class Program
    {
        static void Main(string[] args)
        {
            var factory = new ConnectionFactory() { HostName = "localhost" };
            using (var connection = factory.CreateConnection())
            {
                using (var chanel = connection.CreateModel())
                {
                    chanel.ExchangeDeclare(exchange: "direct_logs", type: "direct");
                    var message = Encoding.UTF8.GetBytes("aaaaa");
                    chanel.BasicPublish(exchange: "direct_logs", routingKey: "info1", basicProperties: null, body: message);
                }
            }
        }
    }
}
